package com.dzh.mapper;

import com.dzh.pojo.Galley;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
@Mapper
public interface GalleyMapper {
    List<Galley> queryAllGalley();
    Galley queryGalleyById(Integer id);
    List<Galley> queryGalleyByrecommend();
    //模糊查询查找
    List<Galley> queryGallyBySearch(@Param("type")String type, @Param("title")String title, @Param("address")String address, @Param("bedrooms")String bedrooms, @Param("bathrooms")String bathrooms, @Param("minprice")int minprice, @Param("maxprice")int maxprice);

    List<Galley> queryGallyBySearchBysale(@Param("type")String type, @Param("title")String title, @Param("address")String address, @Param("bedrooms")String bedrooms, @Param("bathrooms")String bathrooms, @Param("minprice")int minprice, @Param("maxprice")int maxprice);


    List<Integer> queryPidByAid(Integer aid);

    List<Galley> queryGallyBySearchlist(@Param("city")String city,@Param("type")String type,@Param("status") String status,@Param("bedrooms")String bedrooms, @Param("bathrooms")String bathrooms);

    int insertGally(Galley galley);

    Integer queryPidByImg(String img);
}
